lib/deploy: Write to journal if nothing to finalize
authorJonathan Lebon <jonathan@jlebon.com>
Tue, 16 Apr 2019 21:08:24 +0000 (17:08 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 24 Apr 2019 21:38:24 +0000 (21:38 +0000)
This can happen if a deployment was staged and later cleaned up. Though
just as a helper when debugging issues, let's explicitly mention that
case.

Closes: #1841
Approved by: cgwalters

src/libostree/ostree-sysroot-deploy.c

index d837f8ece1870bd57faa326400092e2ed5498222..ce11fe67cc365d624c8c7e2c3e885508eb9104d1 100644 (file)
@@ -2881,7 +2881,10 @@ _ostree_sysroot_finalize_staged (OstreeSysroot *self,
    * service when a staged deployment is created.
    */
   if (!self->staged_deployment)
-    return TRUE;
+    {
+      ot_journal_print (LOG_INFO, "No deployment staged for finalization");
+      return TRUE;
+    }
 
   /* Notice we send this *after* the trivial `return TRUE` above; this msg implies we've
    * committed to finalizing the deployment. */